// Internal action code for project COMP667-Proj

package ca.athabascau.quizmaster.internalactions;

import ca.athabascau.quizmaster.data.DataAccess;

import jason.asSemantics.*;
import jason.asSyntax.*;

public class getsingleontology extends DefaultInternalAction {

    /**
	 * 
	 */
	private static final long serialVersionUID = 7147598199214731250L;

	@Override
    public Object execute(TransitionSystem ts, Unifier un, Term[] args) throws Exception {
        // execute the internal action
        ts.getAg().getLogger().info("executing internal action 'ca.athabascau.quizmaster.internalactions.getsingleontology'");
        DataAccess da=new DataAccess();
        String ontology = da.getOntology();
        ts.getAg().getLogger().info("Ontology="+ontology);
        return un.unifies(args[0], new StringTermImpl(ontology));
      
    }
}
